<script setup>
// 接收父组件传递的数据
let parent = defineProps({
  'icon': {type: String, required: true},
  'label': {type: String, required: false},
  'size': {type: Number, required: false, default: 14},
});
</script>

<template>
  <el-icon class="icon" :size="size">
    <component :is="icon"/>
  </el-icon>
  <span class="text" :style="{'font-size' : size + 'px'}">{{ label }}</span>
</template>

<style scoped lang="scss">

</style>